function $$(obj){
	 return document.getElementById(obj);
	}
function azSelectCss(obj,title,callback){
	$("body").bind("touchstart",function(e){e.preventDefault(e);})
	var obj=obj;	
	var azOption=obj.childNodes;
	var azSelect=document.createElement("div");
	azSelect.setAttribute("id","azSelect");
	var tr="<div id='selectMain'><p id='selectTitle'>"+title+"</p>";
	tr=tr+"<div id='selectCon'>"
    tr=tr+"<ul id='selectUl'>";  
	for(var i=0;i<azOption.length;++i){
		if(azOption[i].innerHTML!=undefined){
	  tr=tr+"<li>"+azOption[i].innerHTML+"</li>"
	  }
	}	
	var selectUlHeight=azOption.length*50;
	tr=tr+"</ul>"	
	tr=tr+"</div>"
	tr=tr+"<div id='selectLine1'></div><div id='selectLine2'></div>"
    tr=tr+"<div id='selectButton'><a id='selectCancel'>取消</a><a id='selectSure'>确认</a></div></div>";	
	azSelect.innerHTML=tr;	
	$$("mainBody").appendChild(azSelect);
	$$("azSelect").setAttribute("style","width:100%;height:100%;position:fixed;left:0;top:0;background:rgba(0,0,0,0.5);z-index:10099")
	$$("selectMain").setAttribute("style","width:90%;height:252px;background:#fff;border-radius:5px;position:absolute;left:5%;top:50%;margin-top:-126px;z-index:10009")
	$$("selectTitle").setAttribute("style","width:100%;height:50px;text-align:center;color:#333;line-height:50px;font-size:16px;")
	$$("selectCon").setAttribute("style","width:100%;height:150px;overflow:hidden;border-top:1px solid #e1e1e1;border-bottom:1px solid #e1e1e1;")
	$$("selectUl").setAttribute("style","width:100%;height:auto;position:relative")
	$("#selectUl li").attr("style","height:50px;width:100%;line-height:50px;font-size:16px;text-align:center;color:#777")
	$$("selectLine1").setAttribute("style","width:70%;position:absolute;top:50%;margin-top:-25px;height:2px;background:#5487ee;left:15%;z-index:10099;")
	$$("selectLine2").setAttribute("style","width:70%;position:absolute;top:50%;margin-top:25px;height:2px;background:#5487ee;left:15%;z-index:10099;")
	$$("selectButton").setAttribute("style","width:100%;height:30px;padding:10px 0;")
	$$("selectCancel").setAttribute("style","width:50%;height:30px;border-right:1px solid #e1e1e1;text-align:center;float:left;line-height:30px;font-size:16px;")
	$$("selectSure").setAttribute("style","width:49%;height:30px;text-align:center;float:left;line-height:30px;font-size:16px;")
	var ulLength=$("#selectUl li").length;
	var topLength=ulLength*50;

    $("#selectUl").css("-webkit-transition","-webkit-transform 0.3s")
	var touchStart,touchEnd,touchMove=0,topMove=0,topMoveSite=0,startTime,slowChange,selected=0;
	$$("selectCon").addEventListener("touchstart",function(e){
		e.preventDefault(e);
		var touch = e.touches[0];
		touchStart=touch.pageY;
		 startTime=new Date().getTime();
		},false)
	$$("selectCon").addEventListener("touchmove",function(e){
		var touch = e.touches[0];
			touchEnd=touch.pageY;
		    touchMove=touchEnd-touchStart;
		    slowChange=Math.round((topMoveSite+touchMove)/50)*50;
			$("#selectUl").css({"-webkit-transform":"translate(0,"+slowChange+"px)"});
			selected=-slowChange/50+1;
		})
	$$("selectCon").addEventListener("touchend",function(e){
		endTime=new Date().getTime();
		var timeLength=endTime-startTime;
		if(timeLength<300){
			touchMove=touchMove*2
			topMoveSite=Math.round((slowChange+touchMove)/50)*50
			}
			else{
			topMoveSite=slowChange;
				}
		   e.preventDefault(e);
			if(50<topMoveSite){
			topMoveSite=50;
			topMove=0;
		   }
		if(-topLength+100>topMoveSite){
			topMoveSite=-topLength+100;
			topMove=topMoveSite;
			}
		$("#selectUl").css({"-webkit-transform":"translate(0,"+topMoveSite+"px)"});
		selected=-topMoveSite/50+1;
		$(this).find("li").css({"font-size":"15px","color":"#999"})
		$(this).find("li").eq(selected).css({"font-size":"20px","color":"#000"})
		},false)
	   
		$$("selectSure").addEventListener("touchstart",function(e){
			
           obj.options[selected].selected = true;
	         callback();
			 $("body").unbind("touchstart");
			$$("mainBody").removeChild(azSelect);
			})
			$$("selectCancel").addEventListener("touchstart",function(e){
			 $("body").unbind("touchstart");
			$$("mainBody").removeChild(azSelect);
			})
			
			
	}